package server;

/**
 * Interface definition: Actions.
 * 
 * @author OpenORB Compiler
 */
public abstract class ActionsPOA extends org.omg.PortableServer.Servant
        implements ActionsOperations, org.omg.CORBA.portable.InvokeHandler
{
    public Actions _this()
    {
        return ActionsHelper.narrow(_this_object());
    }

    public Actions _this(org.omg.CORBA.ORB orb)
    {
        return ActionsHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:server/Actions:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    private static final java.util.Map operationMap = new java.util.HashMap();

    static {
            operationMap.put("createCRecord",
                    new Operation_createCRecord());
            operationMap.put("createMRecord",
                    new Operation_createMRecord());
            operationMap.put("editRecord",
                    new Operation_editRecord());
            operationMap.put("endSession",
                    new Operation_endSession());
            operationMap.put("getAllRecords",
                    new Operation_getAllRecords());
            operationMap.put("getMyRecords",
                    new Operation_getMyRecords());
            operationMap.put("getRecordCounts",
                    new Operation_getRecordCounts());
            operationMap.put("startSession",
                    new Operation_startSession());
            operationMap.put("transferRecord",
                    new Operation_transferRecord());
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        final AbstractOperation operation = (AbstractOperation)operationMap.get(opName);

        if (null == operation) {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }

        return operation.invoke(this, _is, handler);
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke_startSession(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        startSession(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_endSession(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        endSession(arg0_in);

        _output = handler.createReply();

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getAllRecords(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        String _arg_result = getAllRecords(arg0_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getMyRecords(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        String _arg_result = getMyRecords(arg0_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getRecordCounts(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();

        String _arg_result = getRecordCounts(arg0_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_editRecord(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();
        String arg1_in = _is.read_string();
        String arg2_in = _is.read_string();
        String arg3_in = _is.read_string();

        String _arg_result = editRecord(arg0_in, arg1_in, arg2_in, arg3_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_createCRecord(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();
        String arg1_in = _is.read_string();
        String arg2_in = _is.read_string();
        long arg3_in = _is.read_longlong();
        String arg4_in = _is.read_string();
        String arg5_in = _is.read_string();
        String arg6_in = _is.read_string();

        String _arg_result = createCRecord(arg0_in, arg1_in, arg2_in, arg3_in, arg4_in, arg5_in, arg6_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_createMRecord(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();
        String arg1_in = _is.read_string();
        String arg2_in = _is.read_string();
        long arg3_in = _is.read_longlong();
        String arg4_in = _is.read_string();
        String arg5_in = _is.read_string();
        String arg6_in = _is.read_string();

        String _arg_result = createMRecord(arg0_in, arg1_in, arg2_in, arg3_in, arg4_in, arg5_in, arg6_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_transferRecord(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        String arg0_in = _is.read_string();
        String arg1_in = _is.read_string();
        String arg2_in = _is.read_string();

        String _arg_result = transferRecord(arg0_in, arg1_in, arg2_in);

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    // operation classes
    private abstract static class AbstractOperation {
        protected abstract org.omg.CORBA.portable.OutputStream invoke(
                ActionsPOA target,
                org.omg.CORBA.portable.InputStream _is,
                org.omg.CORBA.portable.ResponseHandler handler);
    }

    private static final class Operation_startSession extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_startSession(_is, handler);
        }
    }

    private static final class Operation_endSession extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_endSession(_is, handler);
        }
    }

    private static final class Operation_getAllRecords extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getAllRecords(_is, handler);
        }
    }

    private static final class Operation_getMyRecords extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getMyRecords(_is, handler);
        }
    }

    private static final class Operation_getRecordCounts extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getRecordCounts(_is, handler);
        }
    }

    private static final class Operation_editRecord extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_editRecord(_is, handler);
        }
    }

    private static final class Operation_createCRecord extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_createCRecord(_is, handler);
        }
    }

    private static final class Operation_createMRecord extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_createMRecord(_is, handler);
        }
    }

    private static final class Operation_transferRecord extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final ActionsPOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_transferRecord(_is, handler);
        }
    }

}
